<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html; charset=ISO-8859-1"
 http-equiv="content-type">
  <title>Using Repro</title>
</head>
<body>
<h1>Using Repro</h1>
This guide describes briefly how to get started using repro.  For
help compiling or installing repro, please see the <a
 href="http://scm.sipfoundry.org/rep/resiprocate/main/sip/repro/INSTALL.html">INSTALL</a>
file.<br>
<br>
<h2>1) Run repro</h2>
Run the executable from the command line.  A number of command
line options are available.  For a summary of options run repro
with the help option:<br>
<br>
<pre>%repro --help</pre>
<pre>Usage: repro [OPTION...]</pre>
<pre>  -l, --log-type=syslog|cerr|cout              where to send logging messages</pre>
<pre>                                               (default: "cout")</pre>
<pre>  -v, --log-level=DEBUG|INFO|WARNING|ALERT     specify the default log level</pre>
<pre>                                               (default: "INFO")</pre>
<pre>  -t, --tls-domain=example.com                 act as a TLS server for</pre>
<pre>                                               specified domain</pre>
<pre>  -x, --mysqlServer=localhost                  enable MySQL and provide name</pre>
<pre>                                               of server (default: null)</pre>
<pre>  --udp=5060                                   add UDP transport on specified</pre>
<pre>                                               port (default: 5060)</pre>
<pre>  --tcp=5060                                   add TCP transport on specified</pre>
<pre>                                               port (default: 5060)</pre>
<pre>  --tls=5061                                   add TLS transport on specified</pre>
<pre>                                               port (default: 5061)</pre>
<pre>  --dtls=5061                                  add DTLS transport on specified</pre>
<pre>                                               port (default: 0)</pre>
<pre>  --enable-v6                                  enable IPV6</pre>
<pre>  --disable-v4                                 disable IPV4</pre>
<pre>  --disable-auth                               disable DIGEST challenges</pre>
<pre>  --disable-web-auth                           disable HTTP challenges</pre>
<pre>  --disable-reg                                disable registrar</pre>
<pre>  --enable-cert-server                         run a cert server</pre>
<pre>  -d, --domains=example.com,foo.com            specify domains that this proxy</pre>
<pre>                                               is authorative</pre>
<pre>  -c, --cert-path=STRING                       path for certificates (default:</pre>
<pre>                                               ~/.sipCerts) (default:</pre>
<pre>                                               "/Users/rohan/.sipCerts")</pre>
<pre>  --reqChainName=STRING                        name of request chain (default:</pre>
<pre>                                               default)</pre>
<pre>  --http=5080                                  run HTTP server on specified</pre>
<pre>                                               port (default: 5080)</pre>
<pre><br>Help options:</pre>
<pre>  -?, --help                                   Show this help message</pre>
<pre>  --usage                                      Display brief usage message</pre>
<pre>%</pre>
<br>
Running the proxy server with the default options is fine.  If you
are troubleshooting, we recommend that you enable DEBUG level logging:<br>
<pre>% ./repro -v DEBUG</pre>
<br>
<h2>2) Access the WebAdmin pages</h2>
Now access the HTTP WebAdmin. The WebAdmin run on port 5080 by default,
or a specific port if you specified it on the command line with the
"--http" command-line option.<br>
<br>
Login for the first time with the initial username: admin and the
password "admin".<br>
<br>
<img alt="login screenshot" src="doc/repro-login.png"
 style="width: 446px; height: 192px;"><br>
<h2>3) Add domains</h2>
You must add at least one "domain" before you can use the proxy server.
The domains are names that the proxy recognizes after the at-sign (@)
in the SIP URI. The list of domains is used by the proxy and the
registrar to decide if repro is responsible for SIP requests it
receives.  The WebAdmin also uses the list of domains to make sure
users you add are in one of the domains. <br>
<br>
For example, if you want the proxy to answer requests for atlanta.com,
you need to add atlanta.com to the list of domains.  You still
need to make sure that you configure DNS so that SIP requests for that
domain resolve to repro.<br>
<br>
If you don't have a fully qualified domain name, you can use your IP
address as a "domain".<br>
<br>
<img alt="domain page screenshot" src="doc/repro-domains.png"
 style="width: 701px; height: 300px;"><br>
<br>
<h2>4) Add users</h2>
Next add users. The mandatory fields are the username and the
domain.  The password is the SIP Digest password.<br>
<br>
<img alt="addUser page screenshot" src="doc/repro-addUser.png"
 style="width: 474px; height: 310px;"><br>
<br>
You can view the existing users from the Show Users page.<br>
<br>
<img alt="showUsers page screenshot" src="doc/repro-showUsers.png"
 style="width: 608px; height: 356px;"><br>
<br>
<h2>5) Make a test call</h2>
After adding a user you should try to register. You can check the
status of the registration from the Registrations page on the WebAdmin.<br>
<br>
<h2>6) About Routes and ACLs</h2>
Routes are used by repro to send certain requests to a particular
location. The static routes use (POSIX-standard) regular expression to
match and rewrite SIP URIs.  The screenshot shows an example of
sending all requests that consist of only digits in the userpart of the
SIP URI to a gateway.  Note that to match characters that have a
special meaning in regular expression (like a "."), you need to escape
these. You can also use variable substitution in the rewrite
expression. The string inside the first set of parentheses () is
referenced in the rewrite string as $1, the second is $2, etc.<br>
<br>
<img alt="addRoute page screenshot" src="doc/repro-addRoute.png"
 style="width: 464px; height: 298px;"><br>
<br>
Since it is easy to make mistakes entering regular expressions, you can
test your static routes in the Show Routes page. Type in a SIP URI,
click Test Route.  You should see the rewritten URL below.<br>
<br>
<img alt="showRoutes page screenshot" src="doc/repro-showRoutes.png"
 style="width: 769px; height: 316px;"><br>
<br>
Access Control Lists (ACLs) are not used by the proxy in this release,
but will be used to allow unauthenticated access to relay requests and
access routes in a future release.<br>
<br>
<br>
</body>
</html>
